<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            list-style: none;
            margin: 0;
            padding: 0;
        }
        #sub{
            width: 150px;
        }
        #sub ul>li{
            position: relative;
            width: 100%;
            border:1px red dashed;
        }
        #sub ul ul{
            position:absolute;
            left: 150px;top: 1px;
            width: 152px;
            display: none;
        }
        #sub span{
            display: block;
            line-height: 15px;
            padding: 5px;
            padding-left: 15px;
            cursor: pointer;
        }
        #sub li:hover >ul{
            display: block;
            width: 152px;
            background-color: beige;
        }
        #sub li:hover{
            background-color: azure;
        }
    </style>
</head>
<body>
    <div id="sub">
        <ul>
            <li><span>套餐</span>
                <ul>
                    <li><span>号码</span></li>
                    <li><span>套餐</span></li>
                    <li><span>类型</span></li>
                </ul>
            </li>
            <li><span>宽带</span>
                <ul>
                    <li><span>宽带爆款</span></li>
                    <li><span>宽带爆款</span></li>
                    <li><span>宽带爆款</span></li>
                </ul>
            </li>
            <li><span>充值</span>
                <ul>
                    <li><span>宽带爆款</span></li>
                    <li><span>宽带爆款</span></li>
                    <li><span>宽带爆款</span></li>
                </ul>
            </li>
            <li><span>费用</span>
                <ul>
                    <li><span>宽带爆款</span></li>
                    <li><span>宽带爆款</span></li>
                    <li><span>宽带爆款</span></li>
                </ul>
            </li>
        </ul>
    </div>
</body>
</html>